gtkselection: Ensure the X11 specific message length only applies to X11
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 20 Aug 2014 19:35:02 +0000 (21:35 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 1 Sep 2014 17:17:53 +0000 (19:17 +0200)
Other backends are compilable together with the X11 one, so the message
lenght limit was applying to them all.

https://bugzilla.gnome.org/show_bug.cgi?id=697855

gtk/gtkselection.c

index 1206b6827e4a96ba6e6178dbb5d9fdfd96d97bc1..bd9d22b0d5d3772141b3902c1799dac33c52c831 100644 (file)
    our buffers */
 #ifdef GDK_WINDOWING_X11
 #define GTK_SELECTION_MAX_SIZE(display)                                 \
+  GDK_IS_X11_DISPLAY (display) ?                                        \
   MIN(262144,                                                           \
       XExtendedMaxRequestSize (GDK_DISPLAY_XDISPLAY (display)) == 0     \
        ? XMaxRequestSize (GDK_DISPLAY_XDISPLAY (display)) - 100         \
-       : XExtendedMaxRequestSize (GDK_DISPLAY_XDISPLAY (display)) - 100)
+       : XExtendedMaxRequestSize (GDK_DISPLAY_XDISPLAY (display)) - 100)\
+  : G_MAXINT
 #else
 /* No chunks on Win32 */
 #define GTK_SELECTION_MAX_SIZE(display) G_MAXINT